﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;

namespace Archiver
{
    class Generator
    {
        public static void StartGen()
        {

            var f = new StreamWriter("initValuesTable1.txt",false);

            for (var x=2;x<=128; x++)
                for (var y=1;y<=128; y++)
                {
                    var resultBin = Binary.ConvertIntToBin(BigInteger.Pow(x,y));
                    if (resultBin.Length>128 || resultBin.Length<1)
                        continue;
                    f.WriteLine(string.Format("{0}|{1}|{2}",resultBin,x,y));
                }

            BigInteger a = new BigInteger(1);
            for (var i = 1; i < 128; i++)
            {
                a = 1;
                for (var j = 1; j <= i; j++)
                    a *= j;
                var resultBin = Binary.ConvertIntToBin(a);
                if (resultBin.Length > 128 || resultBin.Length < 1)
                    continue;
                f.WriteLine(string.Format("{0}|{1}|{2}", resultBin, i, 0));
            }

            f.Close();

        }


    }
}
